package com.hzzc.core.model;

public class ExpireSSOUser {

    private long createTime = System.currentTimeMillis();

    private SSOUser ssoUser;


    public ExpireSSOUser() {
    }

    public ExpireSSOUser(SSOUser ssoUser) {
        this.ssoUser = ssoUser;
    }

    public ExpireSSOUser(long createTime, SSOUser ssoUser) {
        this.createTime = createTime;
        this.ssoUser = ssoUser;
    }

    public long getCreateTime() {
        return createTime;
    }

    public ExpireSSOUser setCreateTime(long createTime) {
        this.createTime = createTime;
        return this;
    }

    public SSOUser getSsoUser(long expireTime) {
        if (System.currentTimeMillis() > (createTime + expireTime)) {
            return null;
        }
        return ssoUser;
    }

    public SSOUser getSsoUser() {
        return ssoUser;
    }

    public ExpireSSOUser setSsoUser(SSOUser ssoUser) {
        this.ssoUser = ssoUser;
        return this;
    }
}
